When a data processing system fails to operate as intended, various analysis techniques may be used to identify a source of the failure. Generally, trace functions and breakpoint functions are implemented within the data processing system to aid in the isolation of failing circuitry and to facilitate the correction of failing software programs.
Trace functions provide a means for allowing an external user to observe intermediate results of execution of a data processing operation. Trace functions generally provide a status of selected (CPU) registers and memory included in the data processing system after each instruction or a predetermined group of instructions of a software program is executed by the data processing system. By analyzing the status of selected registers and memory, the trace function provides the external user with very detailed information about an internal data flow of a processor (e.g. CPU) or processing system (e.g. embedded processing system). With this information, many types of errors may be identified and subsequently corrected. Breakpoint functions also provide a method for observing erroneous software code or faulty circuits in a data processing system. A breakpoint function is, in effect, where a preselected event occurs causing a break in a software program. Data is then retrievable to determine a status of the software program. The breakpoint function allows the external user to ascertain a status of each of the selected registers and memory such that data processing errors may be identified.
Both the trace function and the breakpoint function have been integrated in currently available microprocessors of data processing systems to provide the previously described isolation and identification capabilities. For instance, a microprocessor is provided with internal breakpoint registers, which can trigger tracing. Such internal breakpoint registers are dedicated to triggering on either instruction execution addresses or on the addresses of various types of data accesses.
A non-intrusive approach for debug control is the implementation of one or more debug circuitries in the data processing system and microprocessor thereof, respectively, to allow for both real time trace and real time debug functions. The implementation of one or more dedicated debug circuitries may not be economically viable for cost sensitive microcontrollers and may not be feasible for microcontrollers with constraints to the dimensions.
Therefore, a need exists for a data processor, which provides trace and debug functionality making use of existing resources to allow for offering cost sensitive microcontrollers and/or dimensions limited microcontrollers with such functionality.